Skip to content

Enable Full Screen Splash Images#7005

Merged
pelwell merged 1 commit intoraspberrypi:rpi-6.12.yfrom
bebon901:cmdline-working-splash
Aug 26, 2025
Merged

Enable Full Screen Splash Images#7005
pelwell merged 1 commit intoraspberrypi:rpi-6.12.yfrom
bebon901:cmdline-working-splash

Conversation

@bebon901
Copy link
Copy Markdown

This will allow users to enter a cmdline value which will enable the kernel to read a PPM file, and then rendering it fullscreen at the early boot stage.
I am aware it needs a lot of tidying up, but put here for others to reference!

@timg236
Copy link
Copy Markdown
Contributor

timg236 commented Aug 18, 2025

I think it would be preferable (more efficient and smaller code) to use a binary format rather than parsing PPM. TGA is very simple and supports palettes.

@6by9
Copy link
Copy Markdown
Contributor

6by9 commented Aug 18, 2025

There may already be part of this implemented for uefi in drivers/video/fbdev/efifb.c for allowing a vendor specific bitmap to be passed in such that it can be merged into the boot screens. That's how you can get say "Asus" as the background whilst Ubuntu is starting.
I can't remember the full runes, but the BMP file gets exposed as /sys/firmware/acpi/bgrt

Loading the file using the request_firmware calls to load from /lib/firmware (which can be in the initramfs) is far cleaner than messing with filp_open calls for yourself.

Copy link
Copy Markdown
Contributor

@pelwell pelwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not going to give this a full review until you've tidied it up some - it's too tiring otherwise.

A few kernel coding rules (see https://www.kernel.org/doc/html/v6.12/process/coding-style.html for more):

  1. Use TABs for indentation, with tab stops set to 8. Spaces can be used to precise alignment, but only after any TABs.
  2. You have the preferred brace style and no trailing whitespace, so that's good.
  3. Your local variable declarations are also pretty good, but for full marks put them in "reverse Christmas tree" format, longest to shortest, making sure there is a blank line before any statements.
  4. Make all local-scope functions static, and ideally with a module-specific prefix.
  5. Prefer pr_info (or dev_info) over printk(KERN_INFO .

scripts/checkpatch.pl -g <from-commit>..<to-commit> is your fussy friend.

Comment thread drivers/video/fbdev/core/fb_logo.c Outdated
Comment thread drivers/video/fbdev/core/fb_logo.c Outdated
Comment thread drivers/video/fbdev/core/fb_logo.c Outdated
Comment thread drivers/video/fbdev/core/fb_logo.c Outdated
@bebon901
Copy link
Copy Markdown
Author

There may already be part of this implemented for uefi in drivers/video/fbdev/efifb.c for allowing a vendor specific bitmap to be passed in such that it can be merged into the boot screens. That's how you can get say "Asus" as the background whilst Ubuntu is starting. I can't remember the full runes, but the BMP file gets exposed as /sys/firmware/acpi/bgrt

Loading the file using the request_firmware calls to load from /lib/firmware (which can be in the initramfs) is far cleaner than messing with filp_open calls for yourself.

I've had a look around the efifb.c file, and it looks like it's ultimately expecting the data from the ACPI Boot Graphics Resource Table - which following a conversation with Tom, looks like a path we don't want to go down.
Will have a look into the request_firmware option though!

@6by9
Copy link
Copy Markdown
Contributor

6by9 commented Aug 18, 2025

I've had a look around the efifb.c file, and it looks like it's ultimately expecting the data from the ACPI Boot Graphics Resource Table - which following a conversation with Tom, looks like a path we don't want to go down. Will have a look into the request_firmware option though!

I was more thinking if we have the BMP parser etc already in the kernel, it'd be nicer for that to be abstracted out and reused.
I will say that I haven't looked at the detail for whether it actually achieves the same goal as you have here.

@bebon901 bebon901 force-pushed the cmdline-working-splash branch 2 times, most recently from c35e8a4 to 72beea3 Compare August 22, 2025 11:00
@bebon901
Copy link
Copy Markdown
Author

Have now tidied up, and is ready for review @pelwell

Also, it complains about creating a new typedef - what would you like to do about this? - I know a previous comment suggested creating typedef long ImagePalette[224][3]

@pelwell
Copy link
Copy Markdown
Contributor

pelwell commented Aug 22, 2025

This is looking much better. You could replace the typedef with a structure whose only member is the two-dimensional array. And on that subject, is there any reason not to make it an array of u8/uint8_ts? Using longs is wasteful and confusing, in the sense that it makes the reader wonder where you use values large enough to justify their use.

@bebon901 bebon901 force-pushed the cmdline-working-splash branch from 72beea3 to d4e2bec Compare August 22, 2025 15:13
@bebon901
Copy link
Copy Markdown
Author

Thanks! I've updated it to include your suggestions.

@bebon901 bebon901 force-pushed the cmdline-working-splash branch from d4e2bec to f4a7526 Compare August 22, 2025 15:47
@hex0id
Copy link
Copy Markdown

hex0id commented Aug 23, 2025

when are you guys merging this in?

Copy link
Copy Markdown
Contributor

@pelwell pelwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few last-minute suggestions. I nearly hit the Merge button, but this is so close to being good...

Comment thread drivers/video/fbdev/core/fb_logo.c Outdated
Comment thread drivers/video/fbdev/core/fb_logo.c
Comment thread drivers/video/fbdev/core/fb_logo.c Outdated
Comment thread drivers/video/fbdev/core/fb_logo.c Outdated
Comment thread drivers/video/fbdev/core/fb_logo.c Outdated
Comment thread drivers/video/fbdev/core/fb_logo.c
Enable by adding the following to cmdline.txt:
`fullscreen_logo_name=logo.tga fullscreen_logo=1`
Will show the logo file present in /lib/firmware/ on the screen.
This will be fullscreen and rendered early at boot.
Any remaining space is filled with solid color from the image border.
If TGA file is too big, image is clipped accordingly.

Signed-off-by: Ben Benson <ben.benson@raspberrypi.com>
@bebon901 bebon901 force-pushed the cmdline-working-splash branch from f4a7526 to 31d59a0 Compare August 26, 2025 08:53
@pelwell pelwell merged commit 778ec9d into raspberrypi:rpi-6.12.y Aug 26, 2025
12 checks passed
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Aug 26, 2025
kernel: dmaengine: dw-axi-dmac: report per-channel max_burst via device_caps
See: raspberrypi/linux#7011

kernel: Update tpm-slb9673-overlay.dts
See: raspberrypi/linux#6993

kernel: Enable Full Screen Splash Images
See: raspberrypi/linux#7005

kernel: overlays: Rebuild 5inch display from the 7inch
See: raspberrypi/linux#7016
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Aug 26, 2025
kernel: dmaengine: dw-axi-dmac: report per-channel max_burst via device_caps
See: raspberrypi/linux#7011

kernel: Update tpm-slb9673-overlay.dts
See: raspberrypi/linux#6993

kernel: Enable Full Screen Splash Images
See: raspberrypi/linux#7005

kernel: overlays: Rebuild 5inch display from the 7inch
See: raspberrypi/linux#7016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants